using System;
using System.Collections.Generic;

namespace ExcelTemplateEngine.Infrastructure.Logging
{
    public interface ITemplateEngineLogger
    {
        void LogTrace(string message, params object[] args);
        void LogDebug(string message, params object[] args);
        void LogInformation(string message, params object[] args);
        void LogWarning(string message, params object[] args);
        void LogError(string message, params object[] args);
        void LogError(Exception exception, string message, params object[] args);
        void LogCritical(string message, params object[] args);
        void LogCritical(Exception exception, string message, params object[] args);
        
        /// <summary>
        /// 记录性能指标
        /// </summary>
        void LogPerformance(string operation, TimeSpan duration, Dictionary<string, object>? metrics = null);
        
        /// <summary>
        /// 开始性能计时
        /// </summary>
        IDisposable BeginScope(string scopeName);
    }
    
    public enum LogLevel
    {
        Trace = 0,
        Debug = 1,
        Information = 2,
        Warning = 3,
        Error = 4,
        Critical = 5,
        None = 6
    }
}